package com.jxb.demo.controller;

import com.jxb.demo.client.UserServiceClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    private static Logger logger = LoggerFactory.getLogger(UserController.class);

    @Autowired
    private UserServiceClient userServiceClient;

    @GetMapping("/test")
    public String test(){
        logger.info("#####[UserController::test]####start#####");
        String result = userServiceClient.hello();
        logger.info("#####[UserController::test]####end#####");
        return result;
    }

}
